<?php
namespace Plugin\File\Schema;

use Plugin\File\Model\RdFilePlaybackVideo;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 预警录像回放
 */
#[Schema(title: 'RdFilePlaybackVideoSchema')]
class RdFilePlaybackVideoSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: 'id', type: 'bigint')]
    public string $id;

    #[Property(property: 'file_url', title: '录像文件地址', type: 'varchar')]
    public string $file_url;

    #[Property(property: 'yj_data_id', title: '关联的预警数据id', type: 'varchar')]
    public string $yj_data_id;

    #[Property(property: 'created_at', title: 'created_at', type: 'timestamp')]
    public string $created_at;

    #[Property(property: 'updated_at', title: 'updated_at', type: 'timestamp')]
    public string $updated_at;




    public function __construct(RdFilePlaybackVideo $model)
    {
       $this->id = $model->id;
       $this->file_url = $model->file_url;
       $this->yj_data_id = $model->yj_data_id;
       $this->created_at = $model->created_at;
       $this->updated_at = $model->updated_at;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'file_url' => $this->file_url ,'yj_data_id' => $this->yj_data_id ,'created_at' => $this->created_at ,'updated_at' => $this->updated_at];
    }
}